# -*- coding: utf-8 -*-
# @Time    : 2024/9/5 下午4:11
# @Author  : liujun
# @Email   : 2592730854@qq.com
# @File    : class_page.py
# @Software: PyCharm


from appium.webdriver.common.appiumby import AppiumBy as By

class ClassPage:

    #搜索
    search_one_locator=(By.XPATH,"//android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/androidx.drawerlayout.widget.DrawerLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[2]/android.widget.RelativeLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.view.ViewGroup[1]/android.widget.TextSwitcher[1]/android.widget.TextView[1]")
    #视频
    video_locator=(By.XPATH,'//android.view.View[@content-desc="会员免费 3442 人参与 羿视界旭明 解析手机美食摄影|构图&光线&布景&后期 9.9分"]/android.view.View/android.view.View')



    def __init__(self,driver):
        self.driver = driver

    def click_search(self):  #点击搜索
        self.driver.find_element(*self.search_one_locator).click()

    def click_video(self):  #点击视频
        self.driver.find_element(*self.video_locator).click()



